<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>hello h1</h1>
    <div>
      hello div
      <p>hello div p1</p>
      <p>hello div p2</p>
      <p>hello div p3</p>
    </div>
    <p>hello p</p>
    <script>
      console.log(document.body.childNodes);
      console.log(document.body.children);
      console.log(document.body.children[1]);
      console.log(document.body.children[1].children); // childNodes
      console.log(document.body.children[1].nextElementSibling);
      console.log(document.body.children[1].previousElementSibling);
      console.log(document.body.children[1].parentElement); //parentNode
      console.log(document.body.children[1].firstElementChild);
      console.log(document.body.children[1].lastElementChild);
    </script>
  </body>
</html>
